﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace SistemaAdministracion.Models.PatternBase
{
    public interface IRepository<T> where T : class
    {
        IEnumerable<T> GetAll();
        IEnumerable<T> Find(Expression<Func<T, bool>> where);
        T Single(Expression<Func<T, bool>> where);
        T First(Expression<Func<T, bool>> where);
        T SingleOrDefault(Expression<Func<T, bool>> where);
        T SingleOrDefault();
        T FistOrDefault(Expression<Func<T, bool>> where);
        T FistOrDefault();
        void Delete(T Entity);
        void Add(T Entity);
        void Attach(T Entity);

    }
}
